Adding Tabs at the top of the request pane #676
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Description
The tab bar in this application is implemented primarily in
tab_pane.dartandtab_request.dart, with state management handled incollections_provider.dart. The tab bar displays a list of API requests (represented as tabs) that the user can interact with—selecting a tab, closing it, or reordering it. The collections_pane.dart file complements this by managing the collection of requests that populate the tab bar.1. Workflow
TabRequestCard(tab_request.dart):onClose: Triggers when the close icon is tapped to hide the tab.TabPane(tab_pane.dart):consumerwidget that builds the entire tab bar using Riverpod for state management.SingleChildScrollViewto display all visible tabs.Workflow steps:
requestSequence(order of requests) andvisibleTabs(subset of tabs to display).requestIDto a TabRequestCard.selectedIdStateProviderviaonTap.onClose:visibleTabsProvider.2.User Interaction Flow
Opening a Tab : When a request is selected from the collection pane (
collections_pane.dart), its ID is added tovisibleTabsand potentially selectedId (viaonTapinRequestItem).Selecting a Tab : Clicking a
TabRequestCardupdates selectedId, highlighting the tab and loading its associated request data.Closing a Tab : Clicking the close button removes the tab from
visibleTabsand adjusts the selected tab if necessary.Dynamic Updates : Adding, removing, or reordering requests in
collections_provider.dartreflects in the tab bar viarequestSequence.3.
logo_apidash.dartA stateless widget displaying a centered, faded FlutterLogo (opacity 0.1, size 400) as a placeholder for an apidash_logo.
Logic changes from the original code:
TODO:
editor_default.dartandlogo_apidash.dart.WORKING VIDEO :
lv_0_20250318224617.mp4
Related Issues
Adding Tabs at the top of the request pane #306
Checklist
mainbranch before making this PRflutter upgradeand verify)flutter test) and all tests are passingAdded/updated tests?
OS on which you have developed and tested the feature?